package org.kia.data.adapters.droidfu;

import java.io.IOException;
import java.io.InputStream;

import org.kia.data.adapters.ResponseAdapter;

import com.github.droidfu.http.BetterHttpResponse;

/**
 * @author Amir Lazarovich
 */
public class DroidFuResponseAdapter implements ResponseAdapter {

    private BetterHttpResponse mResponse;

    /**
     * Constructs a new DroidFuResponseAdapter
     *
     * @param response
     */
    public DroidFuResponseAdapter(BetterHttpResponse response) {
        mResponse = response;
    }

    @Override
    public InputStream getResponseBody() throws IOException {
        return mResponse.getResponseBody();
    }

    @Override
    public byte[] getResponseBodyAsBytes() throws IOException {
        return mResponse.getResponseBodyAsBytes();
    }

    @Override
    public String getResponseBodyAsString() throws IOException {
        return mResponse.getResponseBodyAsString();
    }

    @Override
    public int getStatusCode() {
        return mResponse.getStatusCode();
    }

    @Override
    public String getHeader(String key) {
        return mResponse.getHeader(key);
    }


}
